﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using Kokomo.Mirror.CliMetadata.Signatures;
using System.Reflection;

namespace Kokomo.Mirror.CliMetadata
{
	abstract class CliImplementedMethodInfo : CliMethodInfoBase
	{
		public CliImplementedMethodInfo(
			CliMemberBasicInfo basicInfo,
			string name
			)
			: base(basicInfo, name)
		{
		}

		//internal MethodDefSignature Signature { get; private set; }
		protected internal abstract MethodDefSignature GetSignature();

		protected override ParameterInfo[] LoadParameters(out ParameterInfo returnParameter)
		{
			return this.basicInfo.module.QueryParameters(
				CodedIndex.FromToken(this.MetadataToken).RowNumber,
				this,
				this.GetSignature(),
				out returnParameter
				);
		}
	}
}
